import Vue from 'vue'
import ElementUI from 'element-ui'
import locale from 'element-ui/lib/locale/lang/zh-CN'
import App from './App'
import store from './store'
import router from './router'
// 引入样式
import 'normalize.css/normalize.css'
import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/reset.scss'
import '@/styles/common.scss'
import '@/styles/element.scss'

import html2Canvas from 'html2canvas'

import '@/assets/icons' // icon
import '@/permission' // permission control
import md5 from 'js-md5'
import SlideVerify from 'vue-monoplasty-slide-verify'
import VueClipboard from 'vue-clipboard2'
import youzupermiss from '@/components/youzupermiss.vue'
Vue.use(VueClipboard)

Vue.use(SlideVerify)
// set ElementUI lang to EN
Vue.use(ElementUI, { locale })

const globalObj = require('./settings.js')
Vue.component('youzupermiss',youzupermiss)
Vue.config.productionTip = false
Vue.prototype.$globalObj = globalObj
Vue.prototype.$md5 = md5
Vue.prototype.$html2Canvas = html2Canvas
Vue.prototype.$hasMethod = (val) => {
  return vue.$route.meta.methods && vue.$route.meta.methods.indexOf(val) > -1
}
const vue = new Vue({
  el: '#app',
  router,
  store,
  render: (h) => h(App)
})
